import http from './service.js'
export default async function request({url, method, params = null, data = null, custom = null}) {
    if (method === 'get') {
        return await http.get(url, {params: params, custom: custom})
    } else if (method === 'post') {
        return await http.post(url, data, {custom: custom})
    } else if (method === 'put') {
        return await http.put(url, data, {custom: custom})
    } else if (method === 'delete') {
        return await http.delete(url, data, {custom: custom})
    }
}
